import { Component } from "react"


// import { useParams } from "react-router-dom"

// function Info(){
//     let ii = useParams()
//     console.log(ii.id);
//     return (
//         <div>
//             <p className='box'>
//                 Infofn
//             </p>
//         </div>
//     )
// }

import {useParams,useLocation,useNavigate}  from "react-router-dom"

function withRouter(Component) {
    return (props) => (
      <Component
        {...props}
        params={useParams()}
        location={useLocation()}
        navigate={useNavigate()}
      />
    );
  }

class Info extends Component {
    constructor() {
        super()
        this.state = {

        }
        
    }
    
    render() {
        console.log(this.props);
        return (
            <div>
                Infoclass
            </div>
        )
    }
}

export default withRouter(Info)